<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Promise自定义封装</title>
  <script src="./promise.js"></script>
</head>

<body>
  <script>
    let p = Promise.resolve('OK')

    console.log(p)

    let p1 = Promise.reject('ERROR')
    console.log(p1)

    let p2 = Promise.reject(new Promise((resolve,reject)=>{
      resolve("OK")
    }))
    console.log(p2)
  </script>
</body>

</html>